// 所有和【服务包管理】相关的请求

import { httpDelete, httpGet, httpPost, httpPut } from "@/utils/http"

export type ServicePacksType = {
    _id?: string,
    name: string,
    count: string,
    type: string,
    price: string | number,
    intro: string,
}
// 分页查询服务包管理数据
export const findServicePacksApi = (data?: object) => {
    return httpPost('/servicePacks/search', data)
}
// 新增服务包管理数据
export const addservicePacksApi = (data?: object) => {
    return httpPost('/servicePacks/add', data)
}
// 删除服务包管理数据
export const deleteservicePacksApi = (data?: object) => {
    return httpDelete('/servicePacks/remove', data)
}
// 修改服务包管理数据
export const updateservicePacksApi = (data?: object) => {
    return httpPut('/servicePacks/update', data)
}
//获取一个服务包详情 /servicePacks/detail
export const detailservicePacksApi = (data?: object) => {
    return httpGet('/servicePacks/detail', data)
}
//按分组查询所有服务包
export const getAllTypePacksApi = (data?: object) => {
    return httpPost('/servicePacks/getAllByType', data)
}
//获取所有服务包分类名称
export const getServiceTypeApi = (data?: object) => {
    return httpGet('/servicePacks/types', data)
}